home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / tcl / extend / tclsrc / fmath.tcl < prev    next >
Encoding:
Text File  |  1993-10-26  |  1.8 KB  |  51 lines  |  [TEXT/MPS ]

  1. #
  2. # fmath.tcl --
  3. #
  4. #   Contains a package of procs that interface to the Tcl expr command built-in
  5. # functions.  These procs provide compatibility with older versions of TclX and
  6. # are also generally useful.
  7. #------------------------------------------------------------------------------
  8. # Copyright 1993 Karl Lehenbauer and Mark Diekhans.
  9. #
  10. # Permission to use, copy, modify, and distribute this software and its
  11. # documentation for any purpose and without fee is hereby granted, provided
  12. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  13. # Mark Diekhans make no representations about the suitability of this
  14. # software for any purpose.  It is provided "as is" without express or
  15. # implied warranty.
  16. #------------------------------------------------------------------------------
  17. # $Id: fmath.tcl,v 1.1 1993/06/21 05:58:43 markd Exp $
  18. #------------------------------------------------------------------------------
  19.  
  20. #@package: TclX-fmath acos asin atan ceil cos cosh exp fabs floor log log10 \
  21.            sin sinh sqrt tan tanh fmod pow atan2 abs double int round
  22.  
  23. proc acos  x {expr acos($x)}
  24. proc asin  x {expr asin($x)}
  25. proc atan  x {expr atan($x)}
  26. proc ceil  x {expr ceil($x)}
  27. proc cos   x {expr cos($x)}
  28. proc cosh  x {expr cosh($x)}
  29. proc exp   x {expr exp($x)}
  30. proc fabs  x {expr abs($x)}
  31. proc floor x {expr floor($x)}
  32. proc log   x {expr log($x)}
  33. proc log10 x {expr log10($x)}
  34. proc sin   x {expr sin($x)}
  35. proc sinh  x {expr sinh($x)}
  36. proc sqrt  x {expr sqrt($x)}
  37. proc tan   x {expr tan($x)}
  38. proc tanh  x {expr tanh($x)}
  39.  
  40. proc fmod {x n} {expr fmod($x,$n)}
  41. proc pow {x n} {expr pow($x,$n)}
  42.  
  43. # New functions that TclX did not provide in eariler versions.
  44.  
  45. proc atan2  x {expr atan2($x)}
  46. proc abs    x {expr abs($x)}
  47. proc double x {expr double($x)}
  48. proc int    x {expr int($x)}
  49. proc round  x {expr round($x)}
  50.  
  51.